import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isUploading: false,
    isLoading:false
  },
  mutations: {
    setLoading(state, payload){
      console.log("mutations setLoading:"+ payload)
      state.isLoading = payload
    }
  },
  actions: {
    syncDataLoading(context, isLoading) {
      console.log("action syncDataLoading:"+ isLoading)
      context.commit('setLoading', isLoading);
    }
  }
})